{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset134 STHeitiSC-Light;\f2\fswiss\fcharset0 Helvetica;
}
{\colortbl;\red255\green255\blue255;\red29\green133\blue25;\red110\green32\blue13;\red186\green0\blue17;
\red180\green0\blue98;\red77\green0\blue158;\red92\green38\blue153;\red46\green13\blue110;\red48\green111\blue121;
\red32\green60\blue63;\red0\green11\blue255;\red68\green137\blue147;}
\paperw11900\paperh16840\margl1440\margr1440\vieww23040\viewh12040\viewkind0
\deftab866
\pard\tx866\pardeftab866\pardirnatural

\f0\fs36 \cf2 \CocoaLigature0 /**1.\cf3  link \cf4 AVFoundation.framework \cf2  */\cf0 \
\pard\tx866\pardeftab866\pardirnatural
\cf3 \
\pard\tx866\pardeftab866\pardirnatural
\cf2 /**2.\cf3  #import \cf4 <AVFoundation/AVFoundation.h> \cf2  */\cf0 \
\pard\tx866\pardeftab866\pardirnatural
\cf3 \
\pard\tx866\pardeftab866\pardirnatural
\cf2 /**3.\cf3  
\f1 \'bf\'bd\'b1\'b4\'d2\'d4\'cf\'c2\'b4\'fa\'c2\'eb
\f0 \cf4  \cf2  */\cf0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab866\pardirnatural

\f2\fs24 \cf0 \CocoaLigature1 \
\pard\tx866\pardeftab866\pardirnatural

\f0\fs36 \cf2 \CocoaLigature0 /**\
 *  @author Whde\
 *	whde_006@163.com\
 *  
\f1 \'c9\'a8\'d2\'bb\'c9\'a8
\f0 \
 */\cf0 \
- (\cf5 void\cf0 )saoBtnClick\
\{\
    \cf6 NSString\cf0  *mediaType = \cf7 AVMediaTypeVideo\cf0 ;\
    \cf7 AVAuthorizationStatus\cf0  authStatus = [\cf6 AVCaptureDevice\cf0  \cf8 authorizationStatusForMediaType\cf0 :mediaType];\
    \cf5 if\cf0 (authStatus == \cf8 AVAuthorizationStatusNotDetermined\cf0  || authStatus == \cf8 AVAuthorizationStatusDenied\cf0 )\{\
        UI\cf9 AlertView\cf0  *alert = [[UI\cf9 AlertView\cf0  \cf8 alloc\cf0 ] \cf10 initWithTitle\cf0 :\cf4 @"
\f1 \'cf\'e0\'bb\'fa\'c8\'a8\'cf\'de\'ca\'dc\'cf\'de
\f0 "\cf0  \cf10 message\cf0 :\cf4 @"
\f1 \'c7\'eb\'d4\'da
\f0 iPhone
\f1 \'b5\'c4
\f0 \\"
\f1 \'c9\'e8\'d6\'c3
\f0 ->
\f1 \'d2\'fe\'cb\'bd
\f0 ->
\f1 \'cf\'e0\'bb\'fa
\f0 \\"
\f1 \'d1\'a1\'cf\'ee\'d6\'d0
\f0 ,
\f1 \'d4\'ca\'d0\'ed
\f0 \\"
\f1 \'d7\'d4\'d3\'ce\'b0\'ee
\f0 \\"
\f1 \'b7\'c3\'ce\'ca\'c4\'fa\'b5\'c4\'cf\'e0\'bb\'fa
\f0 ."\cf0  \cf10 delegate\cf0 :\cf5 nil\cf0  \cf10 cancelButtonTitle\cf0 :\cf4 @"
\f1 \'ba\'c3\'b5\'c4
\f0 "\cf0  \cf10 otherButtonTitles\cf0 :\cf5 nil\cf0 ];\
        [alert \cf10 show\cf0 ];\
        \cf5 return\cf0 ;\
    \}\
    \
    \cf9 QRCodeController\cf0  *qrcodeVC = [[\cf9 QRCodeController\cf0  \cf8 alloc\cf0 ] \cf8 init\cf0 ];\
    qrcodeVC.\cf7 view\cf0 .\cf7 alpha\cf0  = \cf11 0\cf0 ;\
    \cf9 AppDelegate\cf0  *del = (\cf9 AppDelegate\cf0  *)[\cf6 UIApplication\cf0  \cf8 sharedApplication\cf0 ].\cf7 delegate\cf0 ;\
    [\cf5 self\cf0 .\cf12 window\cf0 .\cf7 rootViewController\cf0  \cf8 addChildViewController\cf0 :qrcodeVC];\
    [del.\cf12 window\cf0  \cf8 addSubview\cf0 :qrcodeVC.\cf7 view\cf0 ];\
    [\cf6 UIView\cf0  \cf8 animateWithDuration\cf0 :\cf11 0.3\cf0  \cf8 delay\cf0 :\cf11 0\cf0  \cf8 options\cf0 :\cf8 UIViewAnimationOptionCurveEaseInOut\cf0  \cf8 animations\cf0 :^\{\
        qrcodeVC.\cf7 view\cf0 .\cf7 alpha\cf0  = \cf11 1\cf0 ;\
    \} \cf8 completion\cf0 :^(\cf5 BOOL\cf0  finished) \{\
    \}];\
\}\
}